<template>
  <el-menu  class="el-menu-demo" align="left"
    background-color="#545c64"
            text-color="#fff"
            active-text-color="#409eff"
            router
            unique-opened

  >
      <el-submenu v-for="m1 in menus" :index="m1.name" :key="m1.id" >
        <template slot="title">
          <i :class="m1.icon"></i>
          <span>{{m1.name}}</span>
        </template>

          <el-menu-item  v-for="m2 in m1.children" :index="m2.url" :key="m2.menuId">{{m2.name}}</el-menu-item>
        </el-submenu>


  </el-menu>
</template>

<script>
export default {
  name: "BzMallAside",
  created(){
    this.axios.get("/admin/menu")
      .then(resp=>{
        this.menus = resp.data.data;
      })
  },
  data(){
    return {
      menus:[]
    }
  },
  methods:{
    handleSelect(){

    }
  }
}
</script>

<style scoped>

</style>
